package com.c78.fz.model.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@Accessors(chain = true)
@TableName(value ="td_history")
public class History {
    @TableId(type = IdType.AUTO)
    private Integer id;
    @TableField("clientId")
    private Integer clientId;
    @TableField("manId")
    private Integer manId;
    @TableField("send_water_time")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "Asia/Shanghai")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date sendWaterTime;
    @TableField("send_water_count")
    private Integer sendWaterCount;

    @TableField(exist = false)
    private String manName;
    @TableField(exist = false)
    private String clientName;
}
